Software may be parallelized to permit faster execution, to organize workflow, to provide redundancy, and/or to support distributed processing, for example. Parallelization may involve control parallelism or data parallelism.
Control parallelism may be found in multithreaded environments and multiprocessing environments, for example. Control parallelism supports execution of two or more instruction sequences in parallel. In a multithreaded environment, for example, control parallelism supports execution of two or more threads in parallel, or by at least allows a developer to structure software in a way that facilitates parallel execution of thread instruction sequences if multiple processor cores become available.
Data parallelism supports processing two or more portions of a data set in parallel. Data parallelism therefore involves some form of control parallelism in the instructions that process the data. However, control parallelism does not necessarily involve any data parallelism. Recursion involves control parallelism when recursive calls are parallelized, and may also involve data parallelism if the recursive calls process portions of a data set in parallel.